import Vue from 'vue';
import Router from 'vue-router';
import layout from '../components/layout.vue';
import login from '../views/login/login.vue';
import moldManagement from './moldManagement';
import stock from './stock';
import manufacturingExec from './manufacturingExec';

Vue.use(Router);


const routes = [
    {
        path: '/',
        name: 'login',
        component: login
    },
    {
        path: '/saleGoodsManage',
        name: 'saleGoodsManageLayout',
        component: layout,
    },
    //工装台账管理
    ...moldManagement,
    ...stock,
    ...manufacturingExec,

    // 404 页面
    {
        path: '*',
        name: 'notFound',
        meta: {
            isNotFound: true,
            title: ''
        },
        component: () => import('../components/notFound.vue')
    },
];

const router = new Router({
    mode: 'history',
    routes
});


export default router;
